//
//  BLEPeripheral.m
//  BabyBluetoothOSDemo
//
//  Created by 赵梁 on 2019/9/19.
//  Copyright © 2019 liuyanwei. All rights reserved.
//

#import "BLEDevice.h"

@implementation BLEDevice

- (BOOL)isEqual:(id)other
{
    if (other == self) {
        return YES;
    } else if (![self isKindOfClass:[self class]]) {
        return NO;
    } else {
        if ([self.peripheral isEqual:[(BLEDevice*)other peripheral]]) {
            return YES;
        }
        return NO;
    }
}

- (NSUInteger)hash
{
    return [self.peripheral hash] ^ [self.advertisementData hash] ^ [self.RSSI hash];
}

@end
